package com.mlh.jdbcTemplate.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class TblAccountDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void addDataByJdbcTemplate(TblAccount tblAccount){
        String sql="insert into tbl_account values(?,?,?)";
        jdbcTemplate.update(sql,tblAccount.getId(),tblAccount.getName(),tblAccount.getMoney());
    }
}
